// JavaScript Document
doll.fullscreen = function (divObj) {
		
		if(typeof divObj=="undefined"){
			divObj=document.documentElement; 
		}
	    //$.doll._prof("#debug",divObj)
        if (divObj.requestFullscreen) {
			
            divObj.requestFullscreen();
			console.log("requestFullscreen()");
        }
        else if (divObj.msRequestFullscreen) {
            divObj.msRequestFullscreen();
			console.log("msRequestFullscreen()");
		}
        else if (divObj.mozRequestFullScreen) {
			
            divObj.mozRequestFullScreen();
			console.log("mozRequestFullScreen");
        }
        else if (divObj.requestFullscreen 
		|| ('webkitRequestFullScreen' in document.documentElement) ) 
		{    
		 
		    try{
					 //支持谷歌
					 // 对 Chrome 特殊处理，
					 // 参数 Element.ALLOW_KEYBOARD_INPUT 使全屏状态中可以键盘输入。
					if ( window.navigator.userAgent.toUpperCase().indexOf( 'CHROME' ) >= 0 ) {
						 console.log("chrome浏览正在器全屏webkitRequestFullScreen( Element.ALLOW_KEYBOARD_INPUT )")
						 divObj.webkitRequestFullScreen( Element.ALLOW_KEYBOARD_INPUT );					 
						 
					}else{		
				
                        divObj.webkitRequestFullscreen();
						console.log("webkitRequestFullscreen()");
					}
		     }catch(e){
				 //支持 safari5.1
				 divObj.webkitRequestFullScreen();
				 console.log(" safari5.1 浏览正在器全屏webkitRequestFullScreen")
				 
			 }
        }
		else{		     		 
			console.log("你的浏览器不支持全屏！");
		}
        //doll.inFullScreen = true;
		
        return;
      }
	  
	  
	  doll.exitFullscreen = function () {
        if (document.exitFullscreen) {
          document.exitFullscreen();
        }
        else if (document.msExitFullscreen) {
          document.msExitFullscreen();
        }
        else if (document.mozCancelFullScreen) {
          document.mozCancelFullScreen();
        }
        else if (document.webkitCancelFullScreen) {
			
          document.webkitCancelFullScreen();
        }
        //doll.inFullScreen = false;
		console.log("浏览退出全屏……");
        return;
      }	  
;	  
//END